package game;

import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class Servidor {

	public static void main(String[] args) throws RemoteException {

		try {
			java.rmi.registry.LocateRegistry.createRegistry(1099);
			System.out.println("RMI registry ready.");
		} catch (RemoteException e) {
			System.out.println("RMI registry already running.");
		}
		try {
			Naming.rebind("Jogo", new Jogo());
			System.out.println("Jogo is ready.");
		} catch (Exception e) {
			System.out.println("Jogo failed:");
			e.printStackTrace();
		}
	}

}
